import request from '@/utils/request'

// 查询消耗品库存列表 (分页)
export function selectPageMaterialStock(query) {
  return request({
    url: '/material/materialStock/selectPage',
    method: 'get',
    params: query
  })
}

// 查询消耗品库存列表 (不分页)
export function listMaterialStock(query) {
  return request({
    url: '/material/materialStock/list',
    method: 'get',
    params: query
  })
}

// 查询消耗品库存详细
export function getMaterialStock(stockId) {
  return request({
    url: '/material/materialStock/' + stockId,
    method: 'get'
  })
}

// 新增消耗品库存
export function addMaterialStock(data) {
  return request({
    url: '/material/materialStock',
    method: 'post',
    data: data
  })
}

// 修改消耗品库存
export function updateMaterialStock(data) {
  return request({
    url: '/material/materialStock',
    method: 'put',
    data: data
  })
}

// 删除消耗品库存
export function delMaterialStock(stockId) {
  return request({
    url: '/material/materialStock/' + stockId,
    method: 'delete'
  })
}

// 出库自动补全
export function autoExportList(data) {
  return request({
    url: '/material/materialStock/autoExportList',
    method: 'post',
    data: data
  })
}
